package Thinh.thinh.service;

import java.util.List;

import Thinh.thinh.model.User;


/**
 * Specifies behaviors required
 * by UserService classes.  The 
 * UserService class is typically
 * used by the UserAction to provide
 * business services.
 * @author brucephillips
 *
 */
public interface UserService {
	
	/**
	 * Get all VVUser objects from 
	 * the data repository.
	 * @return Collection of VVUser objects.
	 */
	public List<User> getUsers() ;
	
	/**
	 * Create a VVUser in the repository
	 * using the state of the provided
	 * VVUser object.  Set the Id field
	 * of the provided VVUser object
	 * to the VVUser record's Id value.
	 * @param vVUser VVUser object with state
	 * to replicate in the data repository.
	 */
	public void createUser(User vVUser);
	
	/**
	 * Deletes all VVUser objects from repository.
	 * @return number of VVUser objects deleted.
	 */
	
	public void updateUser(User vVUser);

	/**
	 * Find the VVUser record in the repository
	 * that has the same Id value as the VVUser
	 * object provided and delete that VVUser
	 * record.
	 * @param vVUser VVUser object to delete.
	 */
	public void deleteUser(User vVUser);

	/**
	 * Find the VVUser record in the repository
	 * that has the same Id value as provided 
	 * and create a VVUser object using that 
	 * record's column values.
	 * @param id Id value of VVUser record.
	 * @return VVUser object or null if no VVUser object
	 * was found with matching Id value.
	 */
	public User getUser(Long id);

}
